package cn.kgc.mcartoon.enums;

/**
 * @Description 热漫枚举
 * @Date 2019-09-21 10:08
 * @Author Liujx
 * Version 1.0
 **/
public enum HotCartoonEnum {

    CH(1 ,"国产"), JPN(2,"日漫"), OTHER(3,"综合");

    private HotCartoonEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    private Integer code;

    private String msg;

    public static HotCartoonEnum getByCode(Long code){
        if(code == null){
            return null;
        }
        for (HotCartoonEnum e : HotCartoonEnum.values()){
            if(e.code.equals(code)){
                return e;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
